<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Nest-CMS</title>
    {{!-- 引入boostrap做布局使用 --}}
    <link rel="stylesheet" href="/bootstrap-lib/bootstrap.min.css">
    <link rel="stylesheet" href="/bootstrap-lib/bootstrap-icons.min.css">
    <style>
      .custom-container{
        overflow: auto;
      }
    </style>
  </head>
  <body>
    {{> header}}
    <div class="container-fluid">
        <div class="row">
            {{> sidebar}}
            <div class="col-md-9 col-lg-10">
                <div class="container-fluid custom-container mt-1">
                    {{{ body }}}
                </div>
            </div>
        </div>
    </div>
    {{!-- {{ >menu }} --}}
    {{!-- {{ >content }} --}}
    {{!-- {{{body}}} --}}
    {{!-- 引入boostrap做布局使用 --}}

    <script src="/bootstrap-lib/bootstrap.bundle.min.js"></script>
    <script src="/axios.min.js"></script>
    <script src="/echarts.min.js"></script>
  </body>
  <script>
    const setterHeight = () => {
      let customContainer = document.querySelector('.custom-container');
      let headerHeight = document.querySelector('body>.navbar').clientHeight;
      customContainer.style.height = (window.innerHeight - headerHeight - 5) + 'px';
    }
    window.onresize = function () {
      setterHeight();
    }
    setterHeight();
  </script>
</html>
